
#ifndef MATRIX4_H
#define MATRIX4_H

#include <vector>
#include <GL\glew.h>


namespace Krengine
{
	/**
	 * Matrix data is stored in a one-dimensional array.
	 * The matrix is organized in row-major order.
	 */

	//TODO incorperate all matrix logic in shader files
	class Matrix4
	{
		public:
			explicit Matrix4();
			explicit Matrix4( const std::vector<float>& input );

			/* matrix data is stored here */
			std::vector<float> data;

			void transpose();
			bool inverse();
			const std::string toString() const;

			/*************** operator overloads ***************/
			const Matrix4 operator+ ( const Matrix4& m2 );
			const Matrix4 operator- ( const Matrix4& m2 );
			const Matrix4 operator* ( const Matrix4& m2 );
			const Matrix4 operator/ ( const Matrix4& m2 );
			/*const Matrix4 operator+= ( const Matrix4& m2 );
			const Matrix4 operator-= ( const Matrix4& m2 );
			const Matrix4 operator*= ( const Matrix4& m2 );
			const Matrix4 operator/= ( const Matrix4& m2 );*/

		private:
			void createMinorMatrix( std::vector<float>& minorContainer ) const;
			//void createMinorMatrix( GLfloat *minors ) const;
	};
}


#endif